package org.seeplnframework.skyeye.common.constants;

/**
 * 常量类
 */
public class SysConstant {

    /**
     * 应用名称
     */
    public static final String APPLICATION_NAME = "spring.application.name";

    /**
     * git版本
     */
    public static final String GIT_VERSION = "git.version";

    /**
     * profile配置
     */
    public static final String PROFILES_ACTIVE = "spring.profiles.active";

    /**
     * msg配置
     */
    public static final String SYSTEM_DESC = "EXPORT_SKYEYE_SYSTEM_DESC";

    /**
     * mq消费端配置
     */
    public static final String MQ_ADAPTOR_CONFIG_CONSUMERS = "mq.adaptor.config.consumers";

    /**
     * 欢迎语
     */
    public static final String WELCOME = "Welcome to the skyeye";

    /**
     * log报警开启
     */
    public static final String ALARM_ENABLED = "EXPORT_SKYEYE_LOG_ALARM_ENABLED";

    /**
     * 报警微信机器人配置（支持多个机器人）
     */
    public static final String ALARM_WETALK = "EXPORT_SKYEYE_LOG_ALARM_WETALK";

    /**
     * 报警微信严重错误机器人配置（支持多个机器人）
     */
    public static final String ALARM_SERIOUS_WETALK = "EXPORT_SKYEYE_LOG_ALARM_SERIOUS_WETALK";

    /**
     * 请求参数默认长度
     */
    public static final int ALARM_PARAM_STR_DEFAULT = 1000;

    /**
     * 异常message输出默认长度
     */
    public static final int ALARM_MESSAGE_STR_DEFAULT = 200;

    /**
     * 异常堆栈输出默认行数
     */
    public static final int ALARM_STACKNUM_DEFAULT = 15;

    /**
     * 堆栈行数配置
     */
    public static final String ALARM_STACKNUM = "EXPORT_SKYEYE_LOG_ALARM_STACKNUM";

    /**
     * 单条报警白名单
     */
    public static final String ALARM_WHITE_LIST = "EXPORT_SKYEYE_LOG_ALARM_WHITE_LIST";

    /**
     * 聚合报警白名单
     */
    public static final String ALARM_AGGRE_WHITE_LIST = "EXPORT_SKYEYE_LOG_ALARM_AGGRE_WHITE_LIST";

    /**
     * 报警间隔时间（单位分钟）
     */
    public static final String ALARM_NOTIFY_TIME = "EXPORT_SKYEYE_LOG_ALARM_NOTIFY_TIME";

    /**
     * 报警次数阀值
     */
    public static final String ALARM_NOTIFY_COUNT = "EXPORT_SKYEYE_LOG_ALARM_NOTIFY_COUNT";

    /**
     * 报警间隔时间默认值（单位分钟）
     */
    public static final Integer ALARM_NOTIFY_TIME_DEFAULT = 1;

    /**
     * 报警次数阀值默认值
     */
    public static final Integer ALARM_NOTIFY_COUNT_DEFAULT = 1;

    /**
     * 接口耗时报警间隔时间（单位分钟）
     */
    public static final String ALARM_URI_ELAPSED_TIME = "EXPORT_SKYEYE_LOG_ALARM_URI_ELAPSED_TIME";

    /**
     * 接口耗时超过阀值时间的次数阀值（阀值时间如果不指定则默认1000毫秒）
     */
    public static final String ALARM_URI_ELAPSED_COUNT = "EXPORT_SKYEYE_LOG_ALARM_URI_ELAPSED_COUNT";

    /**
     * 指定URI接口耗时时间阀值（单位毫秒，支持指定多个URI）
     */
    public static final String ALARM_URI_ELAPSED = "EXPORT_SKYEYE_LOG_ALARM_URI_ELAPSED";

    /**
     * 指定接口耗时时间阀值（单位毫秒，全局指定，不配置默认1000毫秒）
     */
    public static final String ALARM_URI_ELAPSED_GLOBAL = "EXPORT_SKYEYE_LOG_ALARM_URI_ELAPSED_GLOBAL";

    /**
     * 接口耗时阀值时间默认值（单位毫秒）
     */
    public static final long ALARM_URI_ELAPSED_DEFAULT = 1000;

    /**
     * 自定义线程池核心线程数
     */
    public static final Integer THREAD_NUM = 5;

    /**
     * 自定义线程池最大线程数
     */
    public static final Integer MAX_THREAD_NUM = 20;

    /**
     * 监控报警指标名称
     */
    public static final String ALARM_METRIC_NAME = "skyeye_alarm_num_gauge";

    /**
     * 监控报警指标名称help
     */
    public static final String ALARM_METRIC_NAME_HELP = "skyeye异常报警数";

    /**
     * 配置为true时log报警以精简模式输出
     */
    public static final String ALARM_SIMPLE = "EXPORT_SKYEYE_LOG_ALARM_SIMPLE";

    /**
     * message相似度阀值(超过该阀值可以对message聚合)
     */
    public static final String message_similarity_threshold = "EXPORT_SKYEYE_MESSAGE_SIMILARITY_THRESHOLD";

    /**
     * 接口超时报警间隔时间默认值 单位分钟
     */
    public static final int timeout_alarm_interval_minute = 1;

    /**
     * 单接口超时次数超过该值进行报警 默认0 即有超时就报警
     */
    public static final int threshold_for_timeout_alarm = 0;
}
